Skip to main content

Get the required tokens for Authentication


Step 1: Get the Phone Number ID

Go to https://developers.facebook.com/ then My Apps, then Select your App, then API Setup


Step 2: Get the App Secret

Go to Setting, then Basic


Step 3: Set the Webhook token

Set the Webhook token with any string, you will add the same value in the Salesforce App

set the Webhook fields to 

    • message_template_status_update
    • messages

Note:

    The Callback URL value, is the createdSite.com URL in Saleforce + /services/apexrest/WA_SF/whatsapp/webhook/v1/

Ex:

    https://optimalx.develop.my.salesforce-sites.com/WA/services/apexrest/WA_SF/whatsapp/webhook/v1/.

Note: 

    you Can get this part https://optimalx.develop.my.salesforce-sites.com from Setup, My Domain, 

    then My Domain Details



Step 4: Get the Whatsapp Permanent token

Go to Ads Management for Facebook, Instagram | Meta for Business 

Then to All tools, then Business setting, then under Users select System Users

If there is no system user”admin” add one 

  • Select Generate New Token 
  • Select the App we have created

  • Token Expiration, never

  • From available permissions, Select

    • Whatsapp_business_messaging

    • whatsapp_business_management

  • Then Generate Token